<template>
	<view class="p-30 w-1 fl-s-s">
		<view class="w-1 br-15 fl-s-s bg-ff p-30 m-b-30" v-for="(item,index) in list" :key="index">
			<view class="w-1 fr-b-c c-33 fs-26">
				<!-- walltype   1=微信 2支付宝 3=银行卡？ -->
				<text v-if="item.walltype==3">{{item.bankname}}（{{ item.bankcard}}）</text>
				<text v-if="item.walltype==1">提现到微信</text>
				<text v-if="item.walltype==2">提现到支付宝</text>
				 <!-- //状态值0=审核中,1=已到账,2=审核失败 -->
				<text>{{item.status==0?'审核中':item.status==1?'已到账':'审核失败'}}</text>
			</view>
			<text class="c-main bold fs-26 m-t-25">-￥{{item.money*1}}</text>
			<view class="w-1 fr-b-c c-66 fs-24 m-t-25">
				<text>实际到账：￥{{item.mastmoney*1}}</text>
				<text>{{item.createtime}}</text>
			</view>
		</view>
		
		<view class="w-1 p-t-150" v-if="nodata">
			<up-empty :icon="$icon"></up-empty>
		</view>
	</view> 
</template>

<script>
	export default {
		data() {
			return {
				path: this.$path,
				page:1,
				list:[],
				loadmore:true,
				nodata:false,
			}
		},
		onLoad() {
			this.getlist()
		},
		onReachBottom() {
			if(this.loadmore){
				this.page++
				this.getlist()
			}
		},
		onPullDownRefresh() {
			this.page = 1;
			this.getlist()
		},
		methods: {
			getlist(){
				uni.$get({
					url:"/api/center/withdrarecolst",
					data:{
						page:this.page,
					}
				}).then(res=>{
					this.list = this.page==1?res.data:[...this.list,...res.data];
					this.nodata = !this.list.length;
					this.loadmore = res.data.length;
				}).catch(err=>{
					this.list = [];
					this.nodata = !this.list.length;
					this.loadmore = true;
				})
			},
		}
	}
</script>

<style>
	page {
		background: #f1f6f7;
	}

	.white-box {
		padding: 0 40rpx;
		width: 690rpx;
		height: 100rpx;
		background: #FFFFFF;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		opacity: 1;
	}

	.card-box {
		width: 690rpx;
		height: 120rpx;
		background: #FFFFFF;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		opacity: 1;
		padding: 0 20rpx;
	}

	.b-act {
		border: 2rpx solid #FF6064;
	}
</style>